Integrand size = 16, antiderivative size = 411 \[ \int \frac {x^4}{1-x^3+x^6} \, dx=\frac {\left (i+\sqrt {3}\right ) \arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {\left (i-\sqrt {3}\right ) \arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}+\frac {\left (3+i \sqrt {3}\right ) \log \left (\sqrt [3]{1-i \sqrt {3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}+\frac {\left (3-i \sqrt {3}\right ) \log \left (\sqrt [3]{1+i \sqrt {3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}-\frac {\left (3+i \sqrt {3}\right ) \log \left (\left (1-i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1-i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {\left (3-i \sqrt {3}\right ) \log \left (\left (1+i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1+i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}} \]
[Out]
Time = 0.18 (sec) , antiderivative size = 411, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {1388, 298, 31, 648, 631, 210, 642} \[ \int \frac {x^4}{1-x^3+x^6} \, dx=\frac {\left (\sqrt {3}+i\right ) \arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {\left (-\sqrt {3}+i\right ) \arctan \left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}-\frac {\left (3+i \sqrt {3}\right ) \log \left (2^{2/3} x^2+\sqrt [3]{2 \left (1-i \sqrt {3}\right )} x+\left (1-i \sqrt {3}\right )^{2/3}\right )}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {\left (3-i \sqrt {3}\right ) \log \left (2^{2/3} x^2+\sqrt [3]{2 \left (1+i \sqrt {3}\right )} x+\left (1+i \sqrt {3}\right )^{2/3}\right )}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}+\frac {\left (3+i \sqrt {3}\right ) \log \left (-\sqrt [3]{2} x+\sqrt [3]{1-i \sqrt {3}}\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}+\frac {\left (3-i \sqrt {3}\right ) \log \left (-\sqrt [3]{2} x+\sqrt [3]{1+i \sqrt {3}}\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}} \]
[In]
[Out]
Rule 31
Rule 210
Rule 298
Rule 631
Rule 642
Rule 648
Rule 1388
Rubi steps \begin{align*} \text {integral}& = -\left (\frac {1}{6} \left (-3+i \sqrt {3}\right ) \int \frac {x}{-\frac {1}{2}-\frac {i \sqrt {3}}{2}+x^3} \, dx\right )+\frac {1}{6} \left (3+i \sqrt {3}\right ) \int \frac {x}{-\frac {1}{2}+\frac {i \sqrt {3}}{2}+x^3} \, dx \\ & = -\left (-\frac {\left (-3-i \sqrt {3}\right ) \int \frac {-\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}+x}{\left (\frac {1}{2} \left (1-i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )} x+x^2} \, dx}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}\right )+\frac {\left (3-i \sqrt {3}\right ) \int \frac {1}{-\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}+x} \, dx}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}-\frac {\left (3-i \sqrt {3}\right ) \int \frac {-\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}+x}{\left (\frac {1}{2} \left (1+i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )} x+x^2} \, dx}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}+\frac {\left (3+i \sqrt {3}\right ) \int \frac {1}{-\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}+x} \, dx}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}} \\ & = \frac {\left (3+i \sqrt {3}\right ) \log \left (\sqrt [3]{1-i \sqrt {3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}+\frac {\left (3-i \sqrt {3}\right ) \log \left (\sqrt [3]{1+i \sqrt {3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}--\frac {\left (-3-i \sqrt {3}\right ) \int \frac {\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}+2 x}{\left (\frac {1}{2} \left (1-i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )} x+x^2} \, dx}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {1}{12} \left (-3+i \sqrt {3}\right ) \int \frac {1}{\left (\frac {1}{2} \left (1+i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )} x+x^2} \, dx-\frac {\left (3-i \sqrt {3}\right ) \int \frac {\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}+2 x}{\left (\frac {1}{2} \left (1+i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )} x+x^2} \, dx}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}+\frac {1}{12} \left (3+i \sqrt {3}\right ) \int \frac {1}{\left (\frac {1}{2} \left (1-i \sqrt {3}\right )\right )^{2/3}+\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )} x+x^2} \, dx \\ & = \frac {\left (3+i \sqrt {3}\right ) \log \left (\sqrt [3]{1-i \sqrt {3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}+\frac {\left (3-i \sqrt {3}\right ) \log \left (\sqrt [3]{1+i \sqrt {3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}-\frac {\left (3+i \sqrt {3}\right ) \log \left (\left (1-i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1-i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {\left (3-i \sqrt {3}\right ) \log \left (\left (1+i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1+i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}--\frac {\left (-3-i \sqrt {3}\right ) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}\right )}{3\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {\left (3-i \sqrt {3}\right ) \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}\right )}{3\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}} \\ & = \frac {\left (i+\sqrt {3}\right ) \tan ^{-1}\left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1-i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {\left (i-\sqrt {3}\right ) \tan ^{-1}\left (\frac {1+\frac {2 x}{\sqrt [3]{\frac {1}{2} \left (1+i \sqrt {3}\right )}}}{\sqrt {3}}\right )}{3\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}+\frac {\left (3+i \sqrt {3}\right ) \log \left (\sqrt [3]{1-i \sqrt {3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}+\frac {\left (3-i \sqrt {3}\right ) \log \left (\sqrt [3]{1+i \sqrt {3}}-\sqrt [3]{2} x\right )}{9\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}}-\frac {\left (3+i \sqrt {3}\right ) \log \left (\left (1-i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1-i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1-i \sqrt {3}}}-\frac {\left (3-i \sqrt {3}\right ) \log \left (\left (1+i \sqrt {3}\right )^{2/3}+\sqrt [3]{2 \left (1+i \sqrt {3}\right )} x+2^{2/3} x^2\right )}{18\ 2^{2/3} \sqrt [3]{1+i \sqrt {3}}} \\ \end{align*}
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.01 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.10 \[ \int \frac {x^4}{1-x^3+x^6} \, dx=\frac {1}{3} \text {RootSum}\left [1-\text {$\#$1}^3+\text {$\#$1}^6\&,\frac {\log (x-\text {$\#$1}) \text {$\#$1}^2}{-1+2 \text {$\#$1}^3}\&\right ] \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.04 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.10
method | result | size |
default | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{6}-\textit {\_Z}^{3}+1\right )}{\sum }\frac {\textit {\_R}^{4} \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{5}-\textit {\_R}^{2}}\right )}{3}\) | \(40\) |
risch | \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{6}-\textit {\_Z}^{3}+1\right )}{\sum }\frac {\textit {\_R}^{4} \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{5}-\textit {\_R}^{2}}\right )}{3}\) | \(40\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 295, normalized size of antiderivative = 0.72 \[ \int \frac {x^4}{1-x^3+x^6} \, dx=-\frac {1}{108} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {3} - 3\right )}^{\frac {1}{3}} {\left (\sqrt {-3} + 1\right )} \log \left (18^{\frac {1}{3}} {\left (\sqrt {3} {\left (i \, \sqrt {-3} - i\right )} + \sqrt {-3} - 1\right )} {\left (i \, \sqrt {3} - 3\right )}^{\frac {2}{3}} + 24 \, x\right ) + \frac {1}{108} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {3} - 3\right )}^{\frac {1}{3}} {\left (\sqrt {-3} - 1\right )} \log \left (18^{\frac {1}{3}} {\left (\sqrt {3} {\left (-i \, \sqrt {-3} - i\right )} - \sqrt {-3} - 1\right )} {\left (i \, \sqrt {3} - 3\right )}^{\frac {2}{3}} + 24 \, x\right ) + \frac {1}{108} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {3} - 3\right )}^{\frac {1}{3}} {\left (\sqrt {-3} - 1\right )} \log \left (18^{\frac {1}{3}} {\left (\sqrt {3} {\left (i \, \sqrt {-3} + i\right )} - \sqrt {-3} - 1\right )} {\left (-i \, \sqrt {3} - 3\right )}^{\frac {2}{3}} + 24 \, x\right ) - \frac {1}{108} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {3} - 3\right )}^{\frac {1}{3}} {\left (\sqrt {-3} + 1\right )} \log \left (18^{\frac {1}{3}} {\left (\sqrt {3} {\left (-i \, \sqrt {-3} + i\right )} + \sqrt {-3} - 1\right )} {\left (-i \, \sqrt {3} - 3\right )}^{\frac {2}{3}} + 24 \, x\right ) + \frac {1}{54} \cdot 18^{\frac {2}{3}} {\left (i \, \sqrt {3} - 3\right )}^{\frac {1}{3}} \log \left (18^{\frac {1}{3}} {\left (i \, \sqrt {3} + 1\right )} {\left (i \, \sqrt {3} - 3\right )}^{\frac {2}{3}} + 12 \, x\right ) + \frac {1}{54} \cdot 18^{\frac {2}{3}} {\left (-i \, \sqrt {3} - 3\right )}^{\frac {1}{3}} \log \left (18^{\frac {1}{3}} {\left (-i \, \sqrt {3} + 1\right )} {\left (-i \, \sqrt {3} - 3\right )}^{\frac {2}{3}} + 12 \, x\right ) \]
[In]
[Out]
Time = 0.08 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.06 \[ \int \frac {x^4}{1-x^3+x^6} \, dx=\operatorname {RootSum} {\left (19683 t^{6} + 243 t^{3} + 1, \left ( t \mapsto t \log {\left (6561 t^{5} + 54 t^{2} + x \right )} \right )\right )} \]
[In]
[Out]
\[ \int \frac {x^4}{1-x^3+x^6} \, dx=\int { \frac {x^{4}}{x^{6} - x^{3} + 1} \,d x } \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 827 vs. \(2 (267) = 534\).
Time = 0.32 (sec) , antiderivative size = 827, normalized size of antiderivative = 2.01 \[ \int \frac {x^4}{1-x^3+x^6} \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 8.61 (sec) , antiderivative size = 304, normalized size of antiderivative = 0.74 \[ \int \frac {x^4}{1-x^3+x^6} \, dx=\frac {\ln \left (x+\left (162\,x+\frac {27\,{\left (-36+\sqrt {3}\,12{}\mathrm {i}\right )}^{2/3}}{4}\right )\,\left (-\frac {1}{162}+\frac {\sqrt {3}\,1{}\mathrm {i}}{486}\right )\right )\,{\left (-36+\sqrt {3}\,12{}\mathrm {i}\right )}^{1/3}}{18}+\frac {\ln \left (x-\left (162\,x+\frac {27\,{\left (-36-\sqrt {3}\,12{}\mathrm {i}\right )}^{2/3}}{4}\right )\,\left (\frac {1}{162}+\frac {\sqrt {3}\,1{}\mathrm {i}}{486}\right )\right )\,{\left (-36-\sqrt {3}\,12{}\mathrm {i}\right )}^{1/3}}{18}-\frac {2^{2/3}\,\ln \left (x+\frac {2^{1/3}\,3^{2/3}\,{\left (-3-\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}}{12}+\frac {2^{1/3}\,3^{1/6}\,{\left (-3-\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}\,1{}\mathrm {i}}{4}\right )\,{\left (-3-\sqrt {3}\,1{}\mathrm {i}\right )}^{1/3}\,\left (3^{1/3}+3^{5/6}\,1{}\mathrm {i}\right )}{36}-\frac {2^{2/3}\,\ln \left (x+\frac {2^{1/3}\,3^{2/3}\,{\left (-3+\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}}{12}-\frac {2^{1/3}\,3^{1/6}\,{\left (-3+\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}\,1{}\mathrm {i}}{4}\right )\,{\left (-3+\sqrt {3}\,1{}\mathrm {i}\right )}^{1/3}\,\left (3^{1/3}-3^{5/6}\,1{}\mathrm {i}\right )}{36}-\frac {2^{2/3}\,\ln \left (x-\frac {2^{1/3}\,3^{2/3}\,{\left (-3-\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}}{6}\right )\,{\left (-3-\sqrt {3}\,1{}\mathrm {i}\right )}^{1/3}\,\left (3^{1/3}-3^{5/6}\,1{}\mathrm {i}\right )}{36}-\frac {2^{2/3}\,\ln \left (x-\frac {2^{1/3}\,3^{2/3}\,{\left (-3+\sqrt {3}\,1{}\mathrm {i}\right )}^{2/3}}{6}\right )\,{\left (-3+\sqrt {3}\,1{}\mathrm {i}\right )}^{1/3}\,\left (3^{1/3}+3^{5/6}\,1{}\mathrm {i}\right )}{36} \]
[In]
[Out]